abstract class $VEC{ET < $NFE{ET}, VT<$VEC{ET,VT},LTP<$REAL_NUMBER{LTP}} <$VEC{ET,VT} |
---|
**** | The full fledged version of the vector abstraction which is parametrized over the type of the vector length in order to deal correctly with the length, magnitudes etc. |
$VEC{_,_} |
VEC | VECD | VECCPXD | VECCPX |
angle_with(arg:VT):LTP; |
---|
**** |
Return the angle between self and arg in radians. _ |
bounded_distance_to_squared(arg:VT,sbnd:LTP):LTP; |
---|
**** |
_ Return the distance between arg and self as long as it's less than or equal to 'sbnd'. May be faster than 'distance_to_squared'. Return "-1.0" if the distance is greater than sbnd. |
cosine_angle_with(arg:VT):LTP; |
---|
**** |
Return the cosine of angle between self and arg in radians. Faster than 'angle_with', usually. _ This is one reason why LTP needs to be a field element, one must divide: cos(theta) = self.dot(arg) / self.length * arg.length; |
distance_to(arg:VT):LTP; |
---|
**** |
return the distance between self and arg. _ |
distance_to_squared(arg:VT):LTP; |
---|
**** |
return the distance between self and arg squared. _ |
dot(arg:VT):ET; |
---|
**** |
Return the dot product of self and arg |
inplace_normalized; |
---|
**** |
Make self have unit length. _ |
length:LTP; |
---|
**** |
__ Return the length of self. Conventionally the Euclidean metric. _ |
length_squared:LTP; |
---|
**** |
__ Return the squared length of self. Conventionally the Euclidean metric. Often faster than 'length'. _ |